﻿Imports ICtagControl.frmStartCompleteBase
Public Class clsDbPaste

    Public Function GetPasteLimitTime(ByVal AgNo As String, ByVal ManageNo As String) As DataTable
        Dim szSql As String = ""
        szSql &= "SELECT OutTime, IneffectTime "
        szSql &= "FROM [dbo].[AgEnterHistory] "
        szSql &= "WHERE AgNo = '" & AgNo & "' "
        szSql &= "AND ManageNo = '" & ManageNo & "' "

        Dim dt As DataTable = PasteDBacs.ExecuteSql(szSql, -1)

        If IsNothing(dt) Then
            GetPasteLimitTime = New DataTable
        Else
            GetPasteLimitTime = dt
        End If

    End Function

    Public Function GetPasteTimeInfo(ByVal AgNo As String) As DataTable
        Dim szSql As String = ""
        szSql &= "SELECT Time_M "
        szSql &= "FROM [dbo].[timeInfo] "
        szSql &= "WHERE xhName = '" & AgNo & "' "

        Dim dt As DataTable = PasteDBacs.ExecuteSql(szSql, -1)

        If IsNothing(dt) Then
            GetPasteTimeInfo = New DataTable
        Else
            GetPasteTimeInfo = dt
        End If

    End Function
End Class
